package com.superbytecode.cloud.common.model.module.annotation;

import com.superbytecode.cloud.common.model.IDict;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: beacon-cloud
 * @Package: com.superbytecode.cloud.common.model
 * @ClassName: Transform
 * @Description: [转换注解]
 * <p> 可标注在字段上、注解上 </p>
 * @Author: [Lance Ting]
 * @Date: 2024/10/21 15:52
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.cn Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
public @interface Transform {

    /**
     * 指定翻译器
     */
    Class<? extends Transformer> transformer() default Transformer.class;

    /**
     * 来源字段
     * <p>
     * 默认自动推断（推断规则：如注解标注的字段是userName，自动推断结果为“user”，“userId”或“userCode”）
     */
    String from() default "";
}
